using UnityEngine;
using System.Collections;


public class TheBoxofLoading : MonoBehaviour {

	// Use this for initialization
	void Start () {
	
	}
	void OnTriggerEnter(Collider other){
		if (other.tag == "goods") {
			Gamemanager.CurrentScore++;
			if(Gamemanager.CurrentScore==Gamemanager.Totalscore&&Gamemanager.Totalscore!=0){
				Application.LoadLevel (Application.loadedLevel);
			}
		}
	}
	void OnTriggerExit (Collider other){
		if (other.tag == "goods") {
			Gamemanager.CurrentScore--;

		}
	}
	// Update is called once per frame
	void Update () {

	}
}
